q = str(input())
if q == '( )' or q == '[ ]' or q == '{ }' or q == '< >':
    print('True')
else:
    print('False')

